package com.bw.entity.order;
import java.math.BigDecimal;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author yzz
 * @since 2020-06-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pi_order_item_material")
public class PiOrderItemMaterial extends Model<PiOrderItemMaterial> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单零件id
     */
    @TableField("orderItemId")
    private Long orderItemId;

    /**
     * 原材料id
     */
    @TableField("materialId")
    private Long materialId;

    /**
     * 规格（0板，1棒）
     */
    @TableField("spec")
    private Integer spec;
    /**
     * 下料数
     */
    @TableField("num")
    private Integer num;

    /**
     * 下料长单位mm
     */
    @TableField("bfLength")
    private Double bfLength;

    /**
     * 下料宽单位mm
     */
    @TableField("bfWidth")
    private Double bfWidth;

    /**
     * 下料高单位mm
     */
    @TableField("bfHight")
    private Double bfHight;

    /**
     * 下料直径单位mm
     */
    @TableField("bfDiam")
    private Double bfDiam;

    /**
     * 产品长单位mm
     */
    @TableField("afLength")
    private Double afLength;

    /**
     * 产品宽单位mm
     */
    @TableField("afWidth")
    private Double afWidth;

    /**
     * 产品高单位mm
     */
    @TableField("afHight")
    private Double afHight;

    /**
     * 产品直径单位mm
     */
    @TableField("afDiam")
    private Double afDiam;

    /**
     * 产品的面积（通过产品的尺寸计算）
     */
    @TableField("afArea")
    private Double afArea;

    /**
     * 产品的重量（根据下料的总重量/加工数量）
     */
    @TableField("afWeight")
    private Double afWeight;

    /**
     * 计算得出每种材料的费用
     */
    @TableField("materCost")
    private BigDecimal materCost;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Double getAfWeight() {
        return afWeight;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(Long orderItemId) {
        this.orderItemId = orderItemId;
    }

    public Long getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Long materialId) {
        this.materialId = materialId;
    }

    public Integer getSpec() {
        return spec;
    }

    public void setSpec(Integer spec) {
        this.spec = spec;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Double getBfLength() {
        return bfLength;
    }

    public void setBfLength(Double bfLength) {
        this.bfLength = bfLength;
    }

    public Double getBfWidth() {
        return bfWidth;
    }

    public void setBfWidth(Double bfWidth) {
        this.bfWidth = bfWidth;
    }

    public Double getBfHight() {
        return bfHight;
    }

    public void setBfHight(Double bfHight) {
        this.bfHight = bfHight;
    }

    public Double getBfDiam() {
        return bfDiam;
    }

    public void setBfDiam(Double bfDiam) {
        this.bfDiam = bfDiam;
    }

    public Double getAfLength() {
        return afLength;
    }

    public void setAfLength(Double afLength) {
        this.afLength = afLength;
    }

    public Double getAfWidth() {
        return afWidth;
    }

    public void setAfWidth(Double afWidth) {
        this.afWidth = afWidth;
    }

    public Double getAfHight() {
        return afHight;
    }

    public void setAfHight(Double afHight) {
        this.afHight = afHight;
    }

    public Double getAfDiam() {
        return afDiam;
    }

    public void setAfDiam(Double afDiam) {
        this.afDiam = afDiam;
    }

    public Double getAfArea() {
        return afArea;
    }

    public void setAfArea(Double afArea) {
        this.afArea = afArea;
    }

    public void setAfWeight(Double afWeight) {
        this.afWeight = afWeight;
    }

    public BigDecimal getMaterCost() {
        return materCost;
    }

    public void setMaterCost(BigDecimal materCost) {
        this.materCost = materCost;
    }
}
